package com.zwb.demo.easyweb.modules.genCode;

import com.zwb.demo.easyweb.common.entity.response.ResponseResult;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.ResponseBody;

@Controller
@Api(value = "生成代码接口" ,description = "生成代码接口")
public class GenCodeController {
    private final GenCodeService genCodeService;

    @Autowired
    public GenCodeController(GenCodeService genCodeService) {
        this.genCodeService = genCodeService;
    }

    @PostMapping("/genCode")
    @ApiOperation(value = "代码生成")
    @ResponseBody
    private ResponseResult genCode(@RequestBody GenCodeVO genCodeVO){
        return genCodeService.genCode(genCodeVO);
    }
}
